Skip to content

fix: properly check source file type in test suite#25

Merged
johanneskoester merged 1 commit into
mainfrom
fix/check-source-file-type
Sep 12, 2025
Merged

fix: properly check source file type in test suite#25
johanneskoester merged 1 commit into
mainfrom
fix/check-source-file-type

Conversation

@johanneskoester

@johanneskoester johanneskoester commented Sep 12, 2025

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Tests
    • Improved robustness of tests for source path attributes by introducing a helper that correctly handles optional values, preventing type errors when attributes are None.
    • Enhances test reliability and clarity without impacting application behavior or public interfaces.
    • No production code changes; users will not see functional differences. Builds and releases are unaffected.

@coderabbitai

coderabbitai Bot commented Sep 12, 2025

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Introduces a helper function within a test to validate that spec source-path attributes are either None or EnvSpecSourceFile, replacing an invalid isinstance usage that included None. The change is limited to test code and does not modify production logic or public interfaces.

Changes

Cohort / File(s) Summary
Tests: source-path attribute None handling
snakemake_interface_software_deployment_plugins/tests.py
Adds is_source_file_or_none(attr) and updates assertions to correctly handle None vs EnvSpecSourceFile when iterating spec.source_path_attributes(). Replaces invalid isinstance(..., (EnvSpecSourceFile, None)) usage.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 338aa1f and b26723d.

📒 Files selected for processing (1)
  • snakemake_interface_software_deployment_plugins/tests.py (1 hunks)
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/check-source-file-type

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@johanneskoester johanneskoester merged commit b0df467 into main Sep 12, 2025
3 of 4 checks passed
@johanneskoester johanneskoester deleted the fix/check-source-file-type branch September 12, 2025 13:58
johanneskoester pushed a commit that referenced this pull request Sep 12, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.7.4](v0.7.3...v0.7.4)
(2025-09-12)


### Bug Fixes

* properly check source file type in test suite
([#25](#25))
([b0df467](b0df467))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant